package daily.nov1112;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Random;

public class Nov14_TeamBuilding {
    public static void main(String[] args) {
        ArrayList<String> olderList = new ArrayList<>();
        ArrayList<String> youngerList = new ArrayList<>();
        Random random = new Random();
        Collections.addAll(olderList,
                "冯永彬", "雷雨", "韦文倩", "秦相玉", "罗婷婷",
                "刘海源", "肖琴", "唐怡", "黄姝", "刘小均",
                "李昱嶙", "伍铃铃", "况红", "杜贝", "袁梅",
                "陈晓虹", "税思蔓", "熊思丽", "刘姝", "文林",
                "赵润龙", "潘成", "岳星", "杨杰");
        Collections.addAll(youngerList,
                "刘希鹏", "苏宇恒", "刘航行", "宋江林", "焦一诺",
                "范鹏飞", "郑杰", "李衡", "胡鑫宇", "何正浩", "陈涵",
                "毛龙华", "何苗", "魏杰", "邱廷鸿", "付钦钦",
                "景茂洋", "李智", "陈虹蓉", "罗富城", "邓渊渊",
                "王雨", "王开心"
        );
        Collections.shuffle(olderList);
        Collections.shuffle(youngerList);
        HashSet<String> olderLuckyGuys = new HashSet<>();
        HashSet<String> youngerLuckyGuys = new HashSet<>();
        while(olderLuckyGuys.size() < 5){
            olderLuckyGuys.add(olderList.get(random.nextInt(olderList.size())));
        }
        while(youngerLuckyGuys.size() < 5){
            youngerLuckyGuys.add(youngerList.get(random.nextInt(youngerList.size())));
        }
        System.out.println(olderLuckyGuys);
        System.out.println(youngerLuckyGuys);
    }
}
